home *** CD-ROM | disk | FTP | other *** search
Text File | 1987-02-26 | 1.5 KB | 61 lines | [TEXT/TEXT] |
- '' 'Ternary Diagram Procedures for Scientists Spreadsheet V2.17'
- '' 'a set of procedures to plot ternary diagrams'
- '' 'the table must be at least 5 columns wide'
- '' 'with the fractions of end members A, B, C, in columns 1, 2, 3'
- '' 'actually, you dont need to put data in 3, it is computed as 1-A-B'
- '' 'columns 4 and 5 are used, so dont put data in them'
- '' 'plot-triange draws the triangle on the graphics screen'
- '' 'with the vertices labeled with the column names'
- '' 'plot-ternary recomputes C and plots the data'
- '' 'pick activated the cursor and prints out A,B,C values'
- '' 'pick is an endless loop, so it must be aborted from the abort menu'
-
- label plot-triangle
- vector .5 .866 0 0
- vector 0 0 1 0
- vector 1 0 .5 .866
- set x colname 2
- anotate -0.04 -0.04 @x
- set x colname 3
- anotate 1.04 -0.04 @x
- set x colname 1
- anotate 0.49 0.906 @x
- delete variable x
- return
-
- label plot-ternary
- '' 'optional first argument is plotting symbol (default is stars)'
- if @arg1 s= ''
- setvar arg1 stars
- xaxis 0 1.28
- yaxis 0.1 0.9
- constant 1 3
- cmath 3 - 2 = 3
- cmath 3 - 1 = 3
- cmath 1 /# 2 = 4
- cmath 3 + 4 = 4
- cmath 1 *# 0.866 = 5
- plot 4 5 @arg1
- return
-
- label pick
- prompt 'use the abort menu to terminate this routine'
- set an colname 1
- set bn colname 2
- set cn colname 3
- for i 1 100
- cursor 'pick a point'
- vmath @ypos / 0.866 = a
- vmath @a / 2 = ao2
- vmath @xpos - @ao2 = c
- vmath @a + @c = b
- vmath 1 - @b = b
- prompt @an ' = ' @a
- prompt @bn ' = ' @b
- prompt @cn ' = ' @c
- next i
- return
-
-
-
-